#include "downloadffmpegdialog.h"
#include "ui_downloadffmpegdialog.h"
#include <QMovie>
#include <QDesktopServices>

DownloadFFMPEGDialog::DownloadFFMPEGDialog(QWidget *parent) :
  MouseMovableDialog(parent),
  ui(new Ui::DownloadFFMPEGDialog)
{
  ui->setupUi(this);
  setupQuitButton();

  connect(ui->gotoButton, &QPushButton::clicked, this, &DownloadFFMPEGDialog::gotoFFmpegDownloadPage);

  movie = new QMovie(":/gif/dl_ffmpeg_mac.gif");
  ui->movieLabel->setMovie(movie);

  movie->start();
}

DownloadFFMPEGDialog::~DownloadFFMPEGDialog()
{
  delete ui;
  movie->deleteLater();
}

void DownloadFFMPEGDialog::gotoFFmpegDownloadPage()
{
  QDesktopServices::openUrl(QUrl("http://ffmpeg.org/download.html"));
}
